package zyc.java.project.springbootproject;

import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController //标识当前类是一个请求处理类
public class HelloController {

    @RequestMapping("/hello") //标识请求路径
    public String hello_func(HttpServletRequest request) {
        String str = "HelloController ... hello: " + request.getParameter("name");
        return str;
    }

}